import { View } from '@tarojs/components'
import s from './index.module.scss'
import ListRow from 'components/ListRow'

const pages = [
  {
    key: 'pages/filter_1/index',
    title: 'filter'
  }, {
    key: 'pages/demo_1/index',
    title: 'background'
  }, {
    key: 'pages/role/index',
    title: '人物卡片'
  }
]

interface Pathprop {
  navigateTo: any
}

export default function Index(props: Pathprop) {
  const {navigateTo} = props
  
  let p = 20
  return (
    <View className={s.page_index}>
      <View className={s.navigation_bar}>
        <View className={s.navigation_title}>首页</View>
      </View>
      {pages.map((item) => (
        <View
          className={s.btn}
          onClick={() => {
            navigateTo(item.key, {a: p, b: 100})
          }}
        >
          <ListRow title={item.title} />
        </View>
      ))}

    </View>
  )
}